#!/usr/bin/python
# -*- coding: utf-8 -*-

# class Person(object):
#     # name = None
#     # age = None
#     def __init__(self, name, age):
#         self.name = name
#         self.age = age
#
#     def run(self):
#         print(f'{self.name}在奔跑')
#
#     def jump(self):
#         print(f'{self.name}在跳')
#
#     def work(self):
#         self.run()
#         self.jump()
#         # self.sleep()
#         def sleep(name):
#             return name
#         result = sleep(self.name)
#         print('sleep result is ', result)
#
#
#     def sleep():
#         print('sleep')
#
# xiamu = Person(name = 'xiaomu', age = 10)
# # xiamu.name = '小牧'
# xiamu.jump()
#
#
# dewei = Person(name = 'dewei', age = 10)
# dewei.jump()
#
#
# dewei.top = 174
# print(dewei.top)
# # print(xiamu.top)
# print(dewei.age)
#
#
# xiamu.work()
# # xiamu.sleep()

#创建地瓜类
class SweetPotato(object):
    def __init__(self):
        self.time = 0
        self.status = '生的'
        self.tiaoliaobiao = []


    def cook(self, time):
        self.time += time
        if int(self.time) < 3:
            self.status = '生的'
        elif 3<= int(self.time) <5:
            self.status = '半生不熟'
        elif 5 <= int(self.time) < 8:
            self.status = '熟了'
        else:
            self.status = '糊了'

    def add_tiaoliao(self):
        a = input('请输入想添加的调料:')
        self.tiaoliaobiao.append(a)

    def __str__(self):
        return f'地瓜现在烤了{self.time}分钟,现在地瓜{self.status},地瓜上添加的调料有{self.tiaoliaobiao}'


if __name__ == '__main__':
    result = SweetPotato()
    result.cook(5)
    print(result)
